package com.bnz.portal.client;

import com.bnz.common.entity.R;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class UserClientFallBackFactory implements FallbackFactory<UserClient> {
	@Override
	public UserClient create(Throwable cause) {
		return new UserClient() {
			@Override
			public R findAll() {
				return R.error("对方没有应答(UserClientFallBackFactory)");
			}
			@Override
			public R findById(String id) {
				return R.error("对方忙线中(UserClientFallBackFactory)");
			}
		};
	}
}